package com.itheima.demo.listener;

import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.delegate.TaskListener;

public class MyTaskListener implements TaskListener{
    @Override
    public void notify(DelegateTask delegateTask) {
        //判断当前任务是创建申请
        if (delegateTask.getName().equals("创建申请")&&delegateTask.getEventName().equals("create"))
        {
            delegateTask.setAssignee("张三");
        }
    }
}
